package com.pda.gongpin.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.pda.gongpin.R;
import com.pda.gongpin.bean.EmptyBean;
import com.wangshen.base.ui.mvp.base.adapter.BaseAdapter;


import java.util.List;

public class EmptyAdapter extends BaseAdapter<EmptyBean> {
    public EmptyAdapter(int layoutResId, @Nullable List<EmptyBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, EmptyBean item) {
        super.convert(helper, item);
        helper.setText(R.id.tv_empty,item.getStorageBinName()+"");
        if (item.getStorageStatus().equals("20")){
            helper.setBackgroundResource(R.id.tv_empty,R.drawable.shape_056dae_2);
        }else {
            helper.setBackgroundResource(R.id.tv_empty,R.drawable.shape_cb8b2f_2);
        }
    }
}
